package cc.vv.btpartyjob.partymanager.activity

import android.content.Intent
import android.view.View
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.btpartyjob.partymanager.delegate.ManagerBaseBinder
import cc.vv.btpartyjob.partymanager.delegate.RedPartyActivityDelegate
import cc.vv.btpartyjob.partymanager.globle.IntentManageKey
import cc.vv.mvp.activity.BaseActivityMVP
import cc.vv.mvp.binder.BaseDataBinder

/**
 * 红领党建
 * Created by Chen.qi on 2018/10/27.
 */
class RedPartyActivity : BaseActivityMVP<RedPartyActivityDelegate>() {

    override fun initData() {
        viewDelegate?.setTopBarTitle("红领党建")
    }

    override fun bindEvenListener() {
        viewDelegate?.setTitleBackBtnOnClick(object : BaseTopBarView.EventInterface {
            //返回
            override fun leftOnClick() {
                finish()
            }

            override fun leftCloseClick() {}
            override fun rightOnClick() {
            }
        })
        viewDelegate?.setOnClickListener(View.OnClickListener {
            //品牌简介
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "品牌简介")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "0")
            startActivity(intent)
        }, R.id.ll_arpV_pinPaiBrief)

        viewDelegate?.setOnClickListener(View.OnClickListener {
            //六大工程
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "六大工程")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "1")
            startActivity(intent)
        }, R.id.ll_arpV_sixProject)

        viewDelegate?.setOnClickListener(View.OnClickListener {
            //六大工程
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "组织引领")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "2")
            startActivity(intent)
        }, R.id.ll_arpV_organLead)

        viewDelegate?.setOnClickListener(View.OnClickListener {
            //党员引领
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "党员引领")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "3")
            startActivity(intent)
        }, R.id.ll_arpV_partyLead)

        viewDelegate?.setOnClickListener(View.OnClickListener {
            //文化引领
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "文化引领")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "4")
            startActivity(intent)
        }, R.id.ll_arpV_cultureLead)

        viewDelegate?.setOnClickListener(View.OnClickListener {
            //标准引领
            val intent = Intent(this, CultureLeadActivity::class.java)
            intent.putExtra(IntentManageKey.INTENT_KEY_TITLE_NAME, "标准引领")
            intent.putExtra(IntentManageKey.INTENT_KEY_RED_PARTY_TYPE_ID, "5")
            startActivity(intent)
        }, R.id.ll_arpV_standardLead)

    }

    override fun getDelegateClass(): Class<RedPartyActivityDelegate> {
        return RedPartyActivityDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return ManagerBaseBinder()
    }
}